package com.hzw.net.net.resource

import android.os.Build
import com.hzw.core.Rom.getRomInfo
import com.hzw.core.rom.getUniqueDeviceId
import com.hzw.core.version.getAppVersionName
import com.hzw.net.annotation.HttpLog
import com.hzw.net.net.ApiConstant
import retrofit2.Retrofit

/**
 *
 * @Author:         HuaZhongWei
 * @CreateDate:     2020/4/15 17:02
 *
 * @Description:    请求相应的内容
 *
 */
data class Http(
    var baseUrl: String = "",
    var retrofit: Retrofit? = null,
    var httpLog: HttpLog = HttpLog.HTTP_LOG_NORMAL,
    val noTokenSet: MutableSet<String> = mutableSetOf(),
    val noEncryptSet: MutableSet<String> = mutableSetOf(),
    val headers: MutableList<Pair<String, String>> = mutableListOf(
        ApiConstant.HEADER_APP_ID to "7",
        ApiConstant.HEADER_DEVICE_ID to getUniqueDeviceId(),
        ApiConstant.HEADER_PLATFORM to "android",
        ApiConstant.HEADER_VERSION to getAppVersionName(),
        ApiConstant.DEVICE_NAME to "(${Build.MANUFACTURER}${Build.BOARD})",
        ApiConstant.DEVICE_MODEL to Build.MODEL,
        ApiConstant.SYSTEM_VERSION to "Android ${Build.VERSION.RELEASE}(${getRomInfo().version})"
    ),
    val apiMap: MutableMap<Class<*>, Any> = mutableMapOf()
)
